package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzCategory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(name = "shop-service-Category")
public interface CategorySercvie {
    //统计类别
    @RequestMapping(value = "/item/service/countCategory",method = RequestMethod.GET)
    LdbzResult countCategory(LdbzCategory entity);
    //获得分类页面
    @RequestMapping(value ="/item/service/getCategoryPage",method = RequestMethod.GET)
    LdbzResult getCategoryPage(LdbzCategory entity,int pn,int limit);
    //获得类别列表
    @RequestMapping(value ="/item/service/getCategoryList",method = RequestMethod.GET)
    LdbzResult getCategoryList(LdbzCategory entity);
    //根据主键查询记录
    @RequestMapping(value ="/item/service/selectByKey",method = RequestMethod.GET)
    LdbzResult selectByKey(Long id);
    //根据主键删除记录
    @RequestMapping(value ="/item/service/deleteByKey",method = RequestMethod.GET)
    LdbzResult deleteByKey(String id);
    //根据主键插入实体
    @RequestMapping(value ="/item/service/insertByEntity",method = RequestMethod.GET)
    LdbzResult insertByEntity(LdbzCategory entity);
    //根据主键更新键
    @RequestMapping(value ="/item/service/updateByKey",method = RequestMethod.GET)
    LdbzResult updateByKey(LdbzCategory entity);
    //获得类别树
    @RequestMapping(value ="/item/service/getCategoryTree",method = RequestMethod.GET)
    LdbzResult getCategoryTree(long fid);
    //获得类别树的redis
    @RequestMapping(value ="/item/service/getCategoryTreeRedis",method = RequestMethod.GET)
    List<LdbzCategory> getCategoryTreeRedis(Object level,Object fid);
    //更新排序
    @RequestMapping(value ="/item/service/updateSort",method = RequestMethod.GET)
    LdbzResult updateSort(String ids);
}
